package ua.org.nuos.sdms.clientgui.client.model;

import ua.org.nuos.sdms.middle.entity.Group;
import ua.org.nuos.sdms.middle.vo.GroupSearch;

/**
 * Created by IntelliJ IDEA.
 * User: dio
 * Date: 19.02.12
 * Time: 16:42
 * To change this template use File | Settings | File Templates.
 */
public class ModelLocator {

    private EntityContainer<Group> group;
    private EntityContainer<GroupSearch> groupSearch;

    public ModelLocator() {
        group = new EntityContainer<Group>();
        groupSearch = new EntityContainer<GroupSearch>();
    }

    public Group getGroup() {
        return group.getEntity();
    }

    public void setGroup(Group group) {
        this.group.setEntity(group);
    }

    public EntityContainer<Group> getGroupContainer() {
        return group;
    }

    public GroupSearch getGroupSearch() {
        return groupSearch.getEntity();
    }

    public void setGroupSearch(GroupSearch groupSearch) {
        this.groupSearch.setEntity(groupSearch);
    }

    public EntityContainer<GroupSearch> getGroupSearchContainer() {
        return groupSearch;
    }

    public void resetData() {
        group.clear();
        groupSearch.clear();
    }

}
